﻿using UnityEngine;
using System;
using System.Collections;

public class SuppressBossListCell : MonoBehaviour
{
	[HideInInspector] public int indexPath;

	public GameObject successObject;
	public GameObject failureObject;

	public UILabel bossNameLabel;
	public UILabel finderNameLabel;

	public GameObject popupDetailButton;

	public UIToggle toggle;

	BossListScene currentScene;

	void Awake()
	{
		currentScene = SceneController.CrrSceneScript as BossListScene;
		toggle = this.GetComponent<UIToggle>();
		this.GetComponent<UIToggle>().onChange.Add(new EventDelegate(() => {
			currentScene.SwitchSuppressBossCell(toggle);
		}));
	}

	public void OnClick_PopupDetailButton()
	{
		this.GetComponent<UIToggle>().value = true;
		currentScene.OnClick_PopupDetailButtonProccess(indexPath);
	}
}